package com.greenline.push.core.pushcenter.impl;

import javax.annotation.Resource;

import com.greenline.push.core.pushcenter.CertConfigManager;
import com.greenline.push.dal.pushcenter.CertConfigDAO;
import com.greenline.push.dal.pushcenter.dataobject.CertConfigDO;
import com.greenline.push.dal.query.CertConfigQuery;

public class CertConfigManagerImpl implements CertConfigManager {

	@Resource
	CertConfigDAO certConfigDAO;

	@Override
	public Long insert(CertConfigDO certConfig) {
		return certConfigDAO.insertCertConfig(certConfig);
	}

	@Override
	public CertConfigDO getCertConfigById(Long id) {
		return certConfigDAO.getCertConfigById(id);
	}

	@Override
	public boolean update(CertConfigDO certConfig) {
		return certConfigDAO.update(certConfig) > 0;
	}

	@Override
	public CertConfigQuery listByQuery(CertConfigQuery query) {
		return certConfigDAO.listByQuery(query);
	}

	@Override
	public boolean delete(Long id) {
		return certConfigDAO.delete(id) > 0;
	}
}
